testing suggestion found on stackoverflow