main functionality complete
need to add ajax