updated scrambler to prepare for better applications