add transparency function