Fixed up k6002gas function and example