Added predict functionality