fixed poor design leading to bad performance