removing unnecesary function from c-file