moved validation function into base class, fixed agent id type