files related to ajax call
refactored the code