add problem constructor for use of database