Fixing hardcoded function