fewer if/elses... easier on the eyes
Fixed issue