simplify code
add code for identifying profiles from remotes