finished blur function implementation