testing objects with functions