changed design, improved implementation mvc