refactor label method. possible fix for #189?