refactoring
added sql param list; cosmetic fixes