removed optional then for ease of readability