changed to use id instead of url