Adding constructor to accept string and not only resid