gluing front and backend together. bug fixes