improved the accuracy, changed to list from data frame for performance and better prediction