sanitized code, removed unnecessary code