Speeding up the create function