changed customization to hooks (issue #28)