change some methods to inline functions