some code for hw-May 16