fixed status to link with accepted and create intermediary table