allowing selecting database in constructor