updaing image functions