added method to agent, and changed GUI to an interface