converted fields to local variables