Thank you all for the input, the reason why i wanted to control the speed of of the fan was because i had made a mistake on one of the connections, but it is all fixed now. Thanks again