Refactored little bit