Added side effect functionality