started class based implementation