added function to handle input from sqlEntry (doesn't work yet)