image handling added but unfinished