updated to accept db username and password