beadutified code and passed with JSlint