rewrite the pos home using oop