script for building data for prediction