my take on this problem