Initial commit of codes part 2

The previous commit did not go through.