add assign5 code