implemented autodeclare