alayer should be simply layer as the argument name?