integrate all code