removed debug code + finished