made minor changes to hexagon.cpp