this code is my stable code for the demo