changed var to val