Added quit function