removed debug output and unnecessary func call