TRAPID source code