Changed some Logic