Hi @MonishaRajendran, please give us better information. We can't judge your code because it is only a little piece with missing variables, eg. "autoWidth" and "myStory" and "FitPageItem" function. We can't possibly know what is going wrong without the full picture. It looks like you are getting numbers from a dialog edit field, but we don't know what those numbers are. It's best if you give us code we can run and test ourselves. Do not be discouraged though—you will get there in the end!