flags done, a little hacky for a few