added sandbox mode & cleaned up example