some usefull functions