main chunk of code added