add contributions from @alenia and @Randommood