generating has been divided to function
texture learning