added some new functionality removed some stuff