improving JS