Initial code. Create function not working