fix proplems with previous coding -- typing done