ajax and javascript functionalities
incorporate changes