debugged app, supports simple master and slave design