added ajax stuff; dont completely understand this and it isnt really even working correctly. fuck.