add more p5 methods, refactoring