solutution for PERM, TESTED and ACCEPTED