changed finalName and code clean up