Removed coding errors and improved