added support for ties