Made Inline Functions for best performance