adjusted gdeclare