adding wp functionality