fixes #4 and also fixes #5