Finished with refactor