updated code some