fixed a problem with the fun function