Added extra functionality & updated sql insert statement
Merge fix