adding custom toggle and pushed everything into the prototype