removed redundant explicit type specification
removed redundant type casts
use implicitly typed local variables