Minor changes. Works,slowly