added convert to double func