added functionality & order of operations