rest restructure for oo