recreated oo functionality