add jquery api, update session for drawing