cleaned up else if structure
fixed formatting and consistency with cgreader