massive speed improvements and added required option