moved some regex to properties, and refactored bind function to a for
loop