ported over initial program