need to fix proxy logic