competition version of code