i think i've done with the algorithm, now we need the frame to run and
test it