add saw func
some fixes