1.changed to using lower level function to increase testing speed
2.removed unnecessary libraries