working on js countries constractor