added comments and started implementing blocking functions