sql functions added, implemented
@error: validations are failing
@todo: file based method needed. currently using sqlite in memory