armor rewritten, but still buggy