small changes and testing method