removed from 3.1 and rearranged some stuff