Fixing create function syntax