improving ArmorFactory code