Added given codes for lab9