add __isset, refactor
add test of enums, refactor