Modify the Melexis Script to be scalable