added back end with AJAX call to database for pins