changed order of if/ else if for test purposes