simplify parsing logic; use parsing facility on client side