seems a little c++ snuck in here just for fun