divide code into two apps