debug flag and such