added background functionality