Added necessary checks, not currently compilin