fix and clear code