readded viky's code