added inline to funcs