use wordpress built in class instead of own