this code does not work in general(only use for demo and testing)