added ep function