integrate menu scripts in functions