Rewriting filling routines to check for valid combinations