adding some scratch code for the core logic