Simplify and improve PS1
simplify