code for 18.3