allowing image to be passed into constructor