added and tested more database queries