added some general funcs