my abstract js functions for work with db