Edited client script to automatically populate db with data