removing errors in code