Some improvements proftable function