support more kinds of flags - fixes #11