start of code draft, still majorly WIP