casting worked commiting just for reference need to figure out how to
use the unique_ptr