added better default values
removed debug code
removed debug code and added docs