copied and shrinked clone of rx.codeplex.com