added new datafunction and bagground