code for gain