updated insert statement, fixed bug