remove debug line and simplifying result