still fixing getimage func