fixing silly logic