working out code