Adding two versions of the code, not sure which is the latest