Final hack version, added comments