some codes for my OS class