forked from old repo from @Rozklad