get js working properly