implemented transformation of ArrayList