Added toggle and read pin support