added method to create prediction