fix bug appeared due to values not intilized to 0