reformatted code to WordPress standards