added comments & neatened stuff