Now all possible types of y are handled + tests extended