formating
updated debug text
migrated over to prepared statements