fixed a bug, cleaned up bundle interface