changed some structures of the solution