added test and main API methods