done almost but need to optimize execution time for generating predictions