improve 9patch helper