given functions for part13