moved res to separate obj