Move contains into solution.c