fixed bug with non-unique function name