return 0 for success. http://stackoverflow.com/questions/9549342/should-i-return-0-or-1-for-successful-function