added sex parameter to getImages