code used in various competitions