file creation functions.js for ajax requests