Refactored to make sence