updated syntax according to JSlint