agent class coded and basic debugging