Got faster version of the basic program working