add solution logic client side