updated note at top of file
fixed bug in the insert statement
fixed bug in the return switch & settings