added test and example