more formatting and remove stateful thing