added random wp function