integration commit

changed some functions. Also have inquiry on adding extra state based on
what he said in lecture