simplify write method and modified method to static