added addCustomFlags method