updated AJAX load items function

to work with back-end