add strong safety check for subprograms