inline transformation and cons instead of append