started work on gestalt.cpp