replaced magic numbers w/ constants and other idiomatic changes