edit now cleans and checks for erros