added stack handling. modified README.