removed magic constant, added braces