removed debugs; proper remote handling