combined some functions