layers of logic