[master] Start implemeting basic algorithm