re-think previous code with the object view