add apps table and management functions