problem with json encoding. fix tomorrow...?