used for view codes