The present invention provides a compound of formula (I), (II), (III) and (IV) as defined herein and pharmaceutically acceptable derivatives thereof. The present invention further provides use of the compounds of the present invention in the treatment of bacterial infection and in the treatment of HIV infection. Also provided are pharmaceutical compositions comprising the compounds of the present invention.