adding function readImg