merged with master and added changes from branch rate_ajax_update