v.2 - Code is optimized/commented/debugging added