some func definitions