adding res
fixed some methods