simplify some functions