wrote check_quota and check_allocation