change compiler to 4.8.2 and simplify code