now works with pet ricks algorithm

still needs to be chained into