initial work on core logic