hand roll to_h function to debug server error