this is like a sudocode. I was in doubt what it should do, so I left it like this for myself.