refactor remove extra logic