Removed debug print statement and renamed result variables