fix stoopid bug in posted code