js app added. some bugs fixed