code partly done