add getActiveLayer func