orginial code is writen