Testing some functions (duplicated)