fixed some declaration problems