added ai task creation method