Cleaned up the code#3