split code for testing and player app