added functionality to picture added