fixed declaration errors