cleaned up to make validate