small changes in retrieveByType method