added train function