Removed unused variable j