Updated from ErikZalm Marlin