added new functionality

still needs fixes