make all function better