complete some functions