moved get_name function to .module file