added some tests and removed deprecated calls