Added work from ctf problem