changes for p_database