return value validation implemented + tests