refactoring grace note implementation