implemented volume control, and restructured slightly