added db 'select' routine