make toggle view works