improved Object oriented pattern