minor changes, returning null pointer errors.