Converting to inline functions