added beep function
reorganized function comment flags