cleans up short circuit code