Creating methods for an object