working on cipher.c, completing/debugging functions in template