i guess that piece of logic goes together with the one below