added double functionality