add bind and unbind functionality
polish the structure
cleanup