implemented image and some other fixes; to be refactored