Added comments; needs to be checked