image handling added but unfinished
finished image handling