reorganized for ease of edits