initial creation of logic