added epochs and plotting"