changed from 3 to 4 code