simplified gcc code