some more handling for undefined data
some bare bones documentation