added stuff from earlier versions