some minor improvements. ready to work