added doubs function