edited main layout and per_agent view