better handling of for loops
add missing return invocation
working display