Modified to use Boost Libraries