removed inline directive from a large function