added comment system to easily understand code.