many changes, fixes