change some short functions to inline functions