resetting picture function