fixed match
code cleanup