Add training functionality