Added analog write method