final commit(complete solution.)