added background substraction