improve solution