changing database to be dynamic