now can return the correct type