added inline functions. oops.