moved unused code to bottom section