The effects of transcription factor competition on gene regulation