Arranged /functions. Edited levy code.