Posted solution for practice 1