merged tablet and static code into main