replaced function call that should replace images