Adding complete solution