added scalability and removed unnecessary stuff