merged all code