adding ajax call and removing php from the page