inline from and to functions