edited my functions