cast type after var declaration