this is from kates branch
made in master
merge conflict fixed