Add function to M
Prevent variables from overwriting each other