changed final codes