I have implemented just the thing you wanted here. If you need please let me know.