Logic run on console