partial solution
better solution