helper scritps and python implementation because why not