Starting to modify old code for our use