Got it working correctly