further refinement of ajax and calander