ammended removing unused code snippets