Add common module

Added permutation function for lists