fixed func to compile and run.