It was written .
It was composed by Knowles and producer Pharrell Williams for her second studio album Sol - Angel and the Hadley St. Dreams ( 2008 ) .
It was written and composed by Knowles and producer Pharrell Williams for her second studio album Sol - Angel and the Hadley St. Dreams ( 2008 ) .