add dependencies and use flags