changed var names a bit