private void seekAndUpdatePosition(Duration duration) {

        final MediaPlayer mediaPlayer = musicPlayer.getMediaPlayer();
        if (mediaPlayer.getStatus() == Status.STOPPED) {
            mediaPlayer.pause();
        }
        System.out.println(mediaPlayer.totalDurationProperty().toString());
        mediaPlayer.seek(duration);
        System.out.println(duration);
        if (mediaPlayer.getStatus() != Status.PLAYING) {
            updatePositionSlider(duration);
            System.out.println("duration + " + duration);
        }

    }