usage of associative array, Fix CS & add tests