02/04/2014: Sameer Adhikari - Modified the code to take parameters, use defaults, and modify userdata