Object oriented methods in model