Added functionality to basic_agent and utils