code for all ml activities