added INLINABLE pragma for generalize