implement contract classes