Added a drawImg function