updating db get function
fixed test