added more explanation of readpos and writepos