belongs to #16
as till mentioned, both the "then" and the "else" case share some code