adding SDL changes from master