Change isloss method to be an object method