Add entropy measuring

LEN is now passed to subroutines, write ENTROPY to calculate entropy