guard added, compiler flags tuned