removing cast warning