some changes on backend for ajax requests