improve performance. fixed bugs
improved performance