adding json marshalling methods and make slice helpers more specific regarding
the signature