return correct type