finalised RB299 functionality and completed code definitions - issue #171