most of logic