added function to start master and slave at the same time