trying json encoding