fixed intent(inout) attribute