learn p margin auto