use slices instead of substring in coffeescript (fixes #63)