merge from mattsta's repo