added new functionality , bug fixes