switch local attributes to private
fix syntax error