Removed assignments in function