An attempt at implementing the Numenta HTM model in java