added flag stuff
GOT EXTENSION STUFF WORKING