added background rectification steps and clean filter