Functional version 1.0, TODO: add stopping function