added ids and open by file id, needs to be refactored