Initial code with errors