Updated 2 methods 1 should work, 1 needs some additional phpcode