renamed
initial script with testcases
loop-less implementation