added models function to ensure models are defined before tasks gets executed