removes stake and improves typecast