removed debug code + cleanup