implemented checkbox and fix template