adding parser for res
stuck with type casting bug