added wp functions