made some changes to suit ajax with backbone