global reduced from 3k lines to 150