added some more functionality and got ajax script working