need to figure out how to write algos