changed database path/file to be dynamic