finished remaining todos in main code, only tests remain