cleaning up of codes