GUI finished, implementing algo