make this library less retarded
fix discard
regenerate
better tests