Refactor to better handle individual cases