added fragment function