changed density functions for multiple islands