New approach to input (more generic)
No more this ugly nextZ