replacing ?=, moving steps to globals.