first commit, trying out an api borrowed from BrianFehrle@github