changed way off updating boolean