Updated to oo code