doing market logic