cleanup, some validation