Building full algorithms for 2 buttons