cleanup function clearField added and tested