work in progress with shaping a main structure
removed unneccessary solution and code optimized