starting restructure the code