refactored future code