removed debug and added test