fix convention and logic