wrote some tests and working on ajax