inline some functions