added prev, expand, and next chapter functions