small tools and code fragment