add code file for practice 3