Changed construct to case statement.