implemented linear-probe
reduced memory leaks