usefull bit funciton