Commented the code a little bit more