On the construction of convolutional codes