added SMA

Hey, let me know if you have any suggestions about the code. Maybe we should discuss how the project should move forward?