Added the complete soltion