made bpp configurable + add template