refactored add for generic fuctions
fixed minor syntax errors
added other methods
fixed power method